projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8cf9473
)
board: mscc: serval: Update MSCC Serval boards
author
Horatiu Vultur
<
[email protected]
>
Thu, 11 Apr 2019 12:11:33 +0000
(14:11 +0200)
committer
Daniel Schwierzeck
<
[email protected]
>
Fri, 3 May 2019 14:42:23 +0000
(16:42 +0200)
In Serval SoC family there are 2 different pcb, both of them have the same
phy, but with different version. Therefore implement board_phy_config
and set all the phys in the same way.
Signed-off-by: Horatiu Vultur <
[email protected]
>
board/mscc/serval/serval.c
patch
|
blob
|
history
diff --git
a/board/mscc/serval/serval.c
b/board/mscc/serval/serval.c
index ade041e11832fe4424952941fa2924e260844b95..da7f55620debec24178a77bd12829cdfb9af01cc 100644
(file)
--- a/
board/mscc/serval/serval.c
+++ b/
board/mscc/serval/serval.c
@@
-6,6
+6,7
@@
#include <common.h>
#include <asm/io.h>
#include <led.h>
+#include <miiphy.h>
enum {
BOARD_TYPE_PCB106 = 0xAABBCD00,
@@
-27,6
+28,17
@@
int board_early_init_r(void)
return 0;
}
+int board_phy_config(struct phy_device *phydev)
+{
+ phy_write(phydev, 0, 31, 0x10);
+ phy_write(phydev, 0, 18, 0x80F0);
+ while (phy_read(phydev, 0, 18) & 0x8000)
+ ;
+ phy_write(phydev, 0, 14, 0x800);
+ phy_write(phydev, 0, 31, 0);
+ return 0;
+}
+
static void do_board_detect(void)
{
u16 gpio_in_reg;